import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [
      {
        path: '/mission',
        name: 'mission',
        component: () => import("../views/mission.vue")
      },
      {
        path: '/performance',
        name: 'performance',
        component: () => import("../views/performance.vue")
      },
      {
        path: '/user',
        name: 'user',
        component: () => import("../views/user.vue")
      },
      {
        path: '/depart',
        name: 'depart',
        component: () => import("../views/depart.vue")
      },
      {
        path: "/mine",
        name: "mine",
        component: () => import("../views/mine.vue")
      },
      {
        path: "information",
        name: "infomation",
        component: () => import("../views/information.vue")
      }
    ]
  },
  {
    path: "/login",
    name: "login",
    component: () => import("../views/login.vue")
  }
]

const router = new VueRouter({
  routes
})

export default router
